package cn.wolfcode.plus.service.impl;

import cn.wolfcode.plus.domain.Department;
import cn.wolfcode.plus.domain.Employee;
import cn.wolfcode.plus.mapper.DepartmentMapper;
import cn.wolfcode.plus.mapper.EmployeeMapper;
import cn.wolfcode.plus.qo.PageResult;
import cn.wolfcode.plus.qo.QueryObject;
import cn.wolfcode.plus.service.IDepartmentService;
import cn.wolfcode.plus.service.IEmployeeService;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Author wyy
 * Date 2021/2/8 18:21
 **/
@Service
public class DepartmentServiceImpl extends ServiceImpl<DepartmentMapper, Department>
        implements IDepartmentService {
//    @Autowired
//    private DepartmentMapper departmentMapper;


    @Override
    public PageResult<Department> query(QueryObject qo) {
        return new PageResult<>(this.page(new Page<>(qo.getCurrentPage(),qo.getPageSize())));
    }
}
